package com.msyy.tj_message.service.impl;


import com.msyy.tj_message.dao.MenuDao;
import com.msyy.tj_message.entity.Menu;
import com.msyy.tj_message.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Classname MenuServiceImpl
 * @Description 菜单信息
 * @Date 2020/5/16 20:26
 * @Created by You
 */
@Service("menuService")
public class MenuServiceImpl implements IMenuService {

    @Autowired
    private MenuDao menuDao;

    /**
     * 通过用户角色Id获取一级菜单信息
     * @return
     */
    @Override
    public List<Menu> getParentMenuByRoleId() {
        return menuDao.getParentMenuByRoleId();
    }

    /**
     * 通过用户角色Id获取二级菜单信息
     * @return
     */
    @Override
    public List<Menu> getChildMenuByRoleId() {
        return menuDao.getChildMenuByRoleId();
    }
}
